/*
 * @Description: 递归深层嵌套测试数据
 * @Author: ZhangHan
 * @Date: 2025-04-23 15:00:00
 */
import Mock from "mockjs";

// 使用Mock生成固定结构的嵌套数据数组
const generateNestedData = () => {
  return Mock.mock([
    {
      id: 1,
      name: "@cname",
      level: 1,
      hasChildren: true,
      children: [
        {
          id: 2,
          name: "@cname",
          level: 2,
          hasChildren: true,
          children: [
            {
              id: 4,
              name: "@cname",
              level: 3,
              hasChildren: false,
              children: [],
            },
            {
              id: 5,
              name: "@cname",
              level: 3,
              hasChildren: true,
              children: [
                {
                  id: 8,
                  name: "@cname",
                  level: 4,
                  hasChildren: false,
                  children: [],
                },
              ],
            },
          ],
        },
        {
          id: 3,
          name: "@cname",
          level: 2,
          hasChildren: true,
          children: [
            {
              id: 6,
              name: "@cname",
              level: 3,
              hasChildren: false,
              children: [],
            },
            {
              id: 7,
              name: "@cname",
              level: 3,
              hasChildren: false,
              children: [],
            },
          ],
        },
      ],
    }
  ]);
};

// 生成测试数据
const mockNestedData = generateNestedData();

export { mockNestedData };
